# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-extutils-xsbuilder
pkgver=0.28
pkgrel=9
pkgdesc="Automatic Perl XS glue code generation"
arch=('any')
url="https://search.cpan.org/dist/ExtUtils-XSBuilder"
license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0' 'perl-parse-recdescent' 'perl-tie-ixhash')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/G/GR/GRICHTER/ExtUtils-XSBuilder-$pkgver.tar.gz)
sha256sums=('8cced386e3d544c5ec2deb3aed055b72ebcfc2ea9a6c807da87c4245272fe80a')

build() {
  cd  "$srcdir"/ExtUtils-XSBuilder-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/ExtUtils-XSBuilder-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
